package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.address.TbProvincesMapper;
import com.dongdongshop.pojo.cities.TbProvinces;
import com.dongdongshop.pojo.cities.TbProvincesExample;
import com.dongdongshop.service.address.ProvincesServiceI;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
@Service
public class ProvincesServiceImpl implements ProvincesServiceI {

   @Resource
    private TbProvincesMapper tbProvincesMapper;

    @Override
    public TbProvinces getById(String provinceId) {
        return tbProvincesMapper.getById(provinceId);
     /*   TbProvincesExample tbProvincesExample=new TbProvincesExample();
        TbProvincesExample.Criteria criteria = tbProvincesExample.createCriteria();
        criteria.andProvinceidEqualTo(provinceId);
        return (TbProvinces) tbProvincesMapper.selectByExample(new TbProvincesExample());*/
    }

    @Override
    public List<TbProvinces> getProvinces() {
        return tbProvincesMapper.selectByExample(null);
    }
}
